package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/sayhi")
    public String sayHi() {
        System.out.println("sayhi方法执行了");
        return "你好,世界";
    }

    @RequestMapping("/sayhello")
    public String sayHello() throws InterruptedException {
        Thread.sleep(250);
        System.out.println("sayHello方法执行了");
        return "世界,你好";
    }
}
